/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javaseapp - Reg1
 * <p>Powered by webrx On 2021-08-06 16:14:25
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class Reg2 {
    public static void main(String[] args) {
        //判断手机号，是不是规范，正则表达式 "1[3,5,8]\\d{9}"
        String phone = "12014577033".trim();
        String pattern = "1[3,5,8]\\d{9}";
        if (phone.matches(pattern)) {
            System.out.println("欢迎：" + phone);
        } else {
            System.out.println("手机号错误。");
        }
    }
}
